package org.siqisource.webstart.core.taglibs;


import java.io.IOException;

import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

import org.siqisource.webstart.context.Path;





/*
 * 输出web系统的根目录
 */
public class WebRootTag extends TagSupport {

	public int doStartTag() throws JspTagException {
		JspWriter out = pageContext.getOut();
		try {
			out.print(Path.getContextPath());
		} catch (IOException ex) {
			throw new JspTagException("IOError:" + ex.getMessage());
		}
		return Tag.SKIP_BODY;
	}

	public int doEndTag() throws JspTagException {
		return Tag.EVAL_PAGE;
	}

}
